<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>变量字面量</title>
</head>
<body>
<script>


  var myVar = 'Hello, World!';
  var variableName = 'myVar';

  console.log(eval(variableName));

  console.log(window[variableName]);


</script>
</body>
</html>